<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./vue.js"></script>
  </head>
  <body>
    <div id="app">
      <!-- 地盘 -->
      <!-- 标签内容的绑定 -->
      <h1>{{title}}</h1>
      <!-- 插值位置 可以写基础表达式 -->
      <h1>{{title+"班"}}</h1>
      <h1>{{title+"班"}}</h1>
      <h1>{{score>=60?"2309":"2310"}}</h1>
      <h1>{{city||"全国"}}</h1>
      <!-- 标签内容插值  渲染html -->
      <!-- 
        <h1>2309</h1>
        <p></p>
       -->
      <div>{{htmlStr}}</div>
      <div v-html="htmlStr"></div>
    </div>
  </body>
  <script>
    let { createApp } = Vue;
    // 创建Vue根实例
    let app = createApp({
      data() {
        // 可以在模板中绑定的数据
        return {
          title: "2309",
          score: 60,
          city: "郑州",
          htmlStr: "<em>hello</em>",
        };
      },
    });
    app = app.mount("#app"); //指定容器
  </script>
</html>
